package info.webest.media;

public class Player {

	public static Mode mode = Mode.MODE_AUDIO_MUSIC;

	public enum Mode {
		MODE_NONE, MODE_AUDIO_MUSIC, MODE_AUDIO_BOOK, MODE_AUDIO_RECORDING, MODE_VIDEO, MODE_VIDEO_RECORD;

		public static Mode fromInteger(int x) {
			switch (x) {
			case 0:
				return MODE_NONE;
			case 1:
				return MODE_AUDIO_MUSIC;
			case 2:
				return MODE_AUDIO_BOOK;
			case 3:
				return MODE_AUDIO_RECORDING;
			case 4:
				return MODE_VIDEO;
			case 5:
				return MODE_VIDEO_RECORD;
			}
			return MODE_NONE;
		}

		public static int toInteger(Mode x) {
			switch (x) {
			case MODE_NONE:
				return 0;
			case MODE_AUDIO_MUSIC:
				return 1;
			case MODE_AUDIO_BOOK:
				return 2;
			case MODE_AUDIO_RECORDING:
				return 3;
			case MODE_VIDEO:
				return 4;
			case MODE_VIDEO_RECORD:
				return 5;
			}
			return 0;
		}
	}

	public static Mode getMode() {
		return mode;
	}

	public static void setMode(Mode newMode) {
		mode = newMode;
	}
}
